<template>
     <input type="text" v-focus>
     <Test></Test>
</template>

<!-- <script>
export default
{
    directives: {
    focus: {
      mounted(el)
      {
        el.focus();    
      }
    }
   }
}
</script> -->

<script setup>
// import { onMounted ,ref} from "vue";
//  const inputRef = ref();
// onMounted(() => {
//   console.log(inputRef.value);
//   inputRef.value.focus();
//  })
import Test from './component/test.vue'
const vFocus = {
  mounted(el)
  {
    el.focus();  
  }
}


</script>

<style lang="less" scoped>

</style>